import { http } from '@/utils/http/axios';

export function getMaterialPage(params) {
  return http.request({
    url: '/material',
    method: 'get',
    params,
  });
}

export function getSearchMaterialPage(params) {
  return http.request({
    url: '/material/search',
    method: 'get',
    params,
  });
}

export function insertMaterial(params) {
  return http.request({
    url: '/material',
    method: 'post',
    params,
  });
}

export function deleteMaterial(id) {
  return http.request({
    url: `/material/${id}`,
    method: 'DELETE',
  });
}

export function updateMaterial(params) {
  return http.request({
    url: '/material',
    method: 'put',
    params,
  });
}
